package cn.dgut.training.vo.activity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CouponFrontVO {

    private Long id;

    private Long couponId;

    private String name;

    private String couponDesc;

    private String tag;

    private BigDecimal couponMin;


    @ApiModelProperty(value = "有效时间限制，如果是0，则基于领取时间的有效天数days；如果是1，则start_time和end_time是优惠券有效期；")
    private Integer timeType;

    @ApiModelProperty(value = "基于领取时间的有效天数days。")
    private Integer days;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    private BigDecimal amount;


    /**
     * 当前优惠券是否可用
     */
    private boolean available;


}
